

@mixin plain_hover($bg_color,$color,$hover_color) {
  background: $bg_color;
  color: $color;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  &:hover {
    background: $color;
    color: $hover_color;
  }
  &:active {
    background: darken($color, 10%);
    color: darken($hover_color, 18%);
  }
  &:disabled {
    background: lighten($bg_color, 10%);
    color: lighten($color, 40%);
  }
  @content;
}
@mixin clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

@mixin scrollBar {
  &::-webkit-scrollbar-track-piece {
    background: #d3dce6;
  }

  &::-webkit-scrollbar {
    width: 6px;
  }

  &::-webkit-scrollbar-thumb {
    background: #99a9bf;
    border-radius: 20px;
  }
}

@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}

@mixin pct($pct) {
  width: #{$pct};
  position: relative;
  margin: 0 auto;
}

@mixin triangle($width, $height, $color, $direction) {
  $width: $width/2;
  $color-border-style: $height solid $color;
  $transparent-border-style: $width solid transparent;
  height: 0;
  width: 0;

  @if $direction==up {
    border-bottom: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  }

  @else if $direction==right {
    border-left: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }

  @else if $direction==down {
    border-top: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  }

  @else if $direction==left {
    border-right: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }
}
/**
 * @author:wangyuqi
 * @description: 按钮样式(scss内置color函数)
 * @date:2024-06-15
 *
 * */
@mixin btn_plain($bg_color,$color) {
  background: $bg_color;
  color: $color;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  &:hover {
    background: $bg_color;
    color: $color;
  }
  &:active {
    background: darken($bg_color, 10%);
    color: darken($color, 18%);
  }
  &:disabled {
    background: lighten($bg_color, 10%);
    color: lighten($color, 40%);
  }
  @content;
}
@mixin plain_hover($bg_color,$color,$hover_color) {
  background: $bg_color;
  color: $color;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  gap: 0 6px;
  &:hover {
    background: $color;
    color: $hover_color;
    border-color: $color;
  }
  &:active {
    background: darken($color, 10%);
    color: darken($hover_color, 18%);
    border-color: darken($color, 10%);
  }
  &:disabled {
    background: lighten($bg_color, 10%);
    color: lighten($color, 40%);
    border-color: lighten($bg_color, 10%);
  }
  @content;
}
@mixin btn_plain_line($bg_color,$color,$line) {
  background: $bg_color;
  color: $color;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
  font-size: 14px;
  &:hover {
    background: $bg_color;
    color: $color;
  }
  &:active {
    background: darken($line, 10%);
    color: lighten($color, 18%);
  }
  &:disabled {
    background: lighten($line, 10%);
    color: lighten($color, 40%);
  }
  @content;
}
